package com.sy.api;

import com.sy.ResultVO;
import com.sy.service.VerifyCodeService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: VerifyCodeController
 * @author: Mr.Liu
 * @date: 2025/11/10 14:00
 * @Version: 1.0
 * @description:
 */
@RestController
@Tag(name = "验证码发送")
@RequestMapping("/api/send")
@Slf4j
public class VerifyCodeController {
    @Resource
    private VerifyCodeService verifyCodeService;
    @GetMapping("/{phone}")
    public ResultVO<Object> sendMsg(@PathVariable String phone){
        log.info("手机号是:{}",phone);
        verifyCodeService.sendMsg(phone);
        return ResultVO.success();
    }

}
